import { createAction, props } from '@ngrx/store';
import { AuthPayload } from './auth.models';

/**
 * 认证通过
 */
export const actionAuthAuthenticated = createAction(
  '[Auth] Authenticated',
  props<{ payload: AuthPayload }>()
);

/**
 * 未通过认证
 */
export const actionAuthUnauthenticated = createAction('[Auth] Unauthenticated');

/**
 * 加载用户状态
 */
export const actionAuthLoadUser = createAction(
  '[Auth] Load User',
  props<{ isUserLoaded: boolean }>()
);

/**
 * 更新认证用户
 */
export const actionAuthUpdateAuthUser = createAction(
  '[Auth] Update Auth User',
  props<{ payload: AuthPayload }>()
);
